import 'package:kkhousekeep/generated/json/base/json_field.dart';
import 'package:kkhousekeep/generated/json/room_token_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class RoomTokenEntity {
	late int code;
	late RoomTokenObj obj;
	late String msg;

	RoomTokenEntity();

	factory RoomTokenEntity.fromJson(Map<String, dynamic> json) => $RoomTokenEntityFromJson(json);

	Map<String, dynamic> toJson() => $RoomTokenEntityToJson(this);

	RoomTokenEntity copyWith({int? code, RoomTokenObj? obj, String? msg}) {
		return RoomTokenEntity()
			..code= code ?? this.code
			..obj= obj ?? this.obj
			..msg= msg ?? this.msg;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RoomTokenObj {
	late String token;

	RoomTokenObj();

	factory RoomTokenObj.fromJson(Map<String, dynamic> json) => $RoomTokenObjFromJson(json);

	Map<String, dynamic> toJson() => $RoomTokenObjToJson(this);

	RoomTokenObj copyWith({String? token}) {
		return RoomTokenObj()
			..token= token ?? this.token;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}